
package com.stx.controller;

import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.ws.RequestWrapper;

/**
 * @author huzixuan
 * @date 2020-12-25 11:12
 */
@Controller
//@Component
//@Repository
//@Service
public class HelloController  {
    @RequestMapping("/form")
   public String hello(Model model){
       model.addAttribute("msg","hello spring");
//       返回值会被拼接成jsp文件名字
       return "form";
   }
}
